{% import 'Import/app_import.html.twig' as appImport %}
<ul class="nav nav-tabs mb-4">
    <li class="nav-item">
        <a class="nav-link {% if 'summary' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('snapshots_read', {'repository': snapshot.repository, 'snapshot': snapshot.name}) }}">{{ 'summary'|trans }}</a>
    </li>

    {% if is_granted('SNAPSHOT_RESTORE', snapshot) %}
        <li class="nav-item">
            <a class="nav-link {% if 'restore' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('snapshots_read_restore', {'repository': snapshot.repository, 'snapshot': snapshot.name}) }}">{{ 'restore'|trans }}</a>
        </li>
    {% endif %}

    {% if is_granted('SNAPSHOT_CLONE', snapshot) %}
        <li class="nav-item">
            <a class="nav-link {% if 'clone' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('snapshots_read_clone', {'repository': snapshot.repository, 'snapshot': snapshot.name}) }}">{{ 'clone'|trans }}</a>
        </li>
    {% endif %}

    {% if is_granted('SNAPSHOT_FAILURES', snapshot) and 0 < snapshot.failures|length %}
        <li class="nav-item">
            <a class="nav-link {% if 'failures' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('snapshots_read_failures', {'repository': snapshot.repository, 'snapshot': snapshot.name}) }}">{{ 'failures'|trans }}</a>
        </li>
    {% endif %}
</ul>
